package com.zhongge.preknow.factorymethod;

/**
 * @ClassName Test
 * @Description TODO
 * @Author zhongge
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        IUserFactory adminUserFactory = new AdminUserFactory();
        User adminUser = adminUserFactory.createUser("管理员", 1);

        IUserFactory normalUserFactory = new NormalUserFactory();
        User normalUser = normalUserFactory.createUser("普通用户", 2);

        System.out.println(adminUser);
        System.out.println(normalUser);
    }
}
